﻿using Exam.Domain.Tables;
using Exam.Shared.Dto;
using Microsoft.AspNetCore.Mvc;

// For more information on enabling Web API for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860

namespace Exam.WebApi.Controllers
{
    [Route("api/[controller]")]
    [ApiController]
    public class ExamCategoryController : ControllerBase
    {
      private readonly  Exam.IService.IProductCategoryService _productCategoryService;
        public ExamCategoryController(Exam.IService.IProductCategoryService productCategoryService)
        {
            _productCategoryService = productCategoryService;
        }

        // GET: api/<ExamCategoryController>
        [HttpGet]
        public IEnumerable<Exam.Shared.Dto.Tb_Proudct_CategoryOutpuDto> Get()
        {
            return _productCategoryService.GetAll();
        }

        

        // GET api/<ExamCategoryController>/5
        [HttpGet("{id}")]
        public string Get(int id)
        {
            return "value";
        }

        // POST api/<ExamCategoryController>
        [HttpPost]
        public void Post([FromBody] string value)
        {
        }

        // PUT api/<ExamCategoryController>/5
        [HttpPut("{id}")]
        public void Put(int id, [FromBody] string value)
        {
        }

        // DELETE api/<ExamCategoryController>/5
        [HttpDelete("{id}")]
        public void Delete(int id)
        {
        }
    }
}
